﻿using EF_基础1.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EF_基础1.Configs
{
    public class PigeonOwnerConfig : IEntityTypeConfiguration<PigeonOwner>
    {
        public void Configure(EntityTypeBuilder<PigeonOwner> builder)
        {
            builder.ToTable("T_PigeonOwner");
            builder.Property(o => o.Name).IsRequired().HasMaxLength(100);
            builder.Property(o => o.City).IsRequired().HasMaxLength(100);
        }
    }
}
